<?php


namespace App\Console\Commands\Statistics\Platform\Day;


use Illuminate\Console\Command;

class ManyKindsData extends Command
{
    //命令名
    protected $signature = 'platform-day-many-kinds-data';

    //命令描述
    protected $description = '统计每日平台多种数据';

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        app('repo_data_statistics')->manyKinds();

        if (time() > strtotime('2021-11-17 17:00:00') && time() < strtotime('2021-11-17 17:20:00')) {
            $date = '2021-10-15';
            while (true) {
                app('repo_data_statistics')->tmp($date);
                $date = date('Y-m-d', strtotime("$date +1 day"));
                if ($date == '2021-11-17') {
                    break;
                }
            }
        }
    }
}